Conversation
📝 WalkthroughWalkthroughAdded MSBuild properties to manage build output by platform, decorated test fixtures with ChangesBuild Configuration & Test Parallelization
S3StorageService Presigned HEAD Fallback
Sequence DiagramsequenceDiagram
actor Caller
participant S3StorageService
participant S3API as S3 Metadata API
participant Logger
participant PresignedURL as Presigned URL<br/>Generator
participant HTTPClient as HTTP Client
Caller->>S3StorageService: ExistsAsync(objectKey)
S3StorageService->>S3API: GetObjectMetadataAsync()
alt Metadata request throws FormatException
S3API-->>S3StorageService: FormatException
S3StorageService->>Logger: Log warning
S3StorageService->>PresignedURL: CreatePresignedHeadUrl()
PresignedURL-->>S3StorageService: presignedHeadUrl
S3StorageService->>S3StorageService: ExistsWithPresignedHeadAsync()
loop Retry loop
S3StorageService->>HTTPClient: HEAD presignedHeadUrl
HTTPClient-->>S3StorageService: Response (200, 404, or transient error)
alt 200 OK
S3StorageService-->>Caller: return true
else 404 Not Found
S3StorageService-->>Caller: return false
else Transient Error & Retries Remaining
S3StorageService->>S3StorageService: Wait & retry
else Retries Exhausted
S3StorageService-->>Caller: throw InvalidOperationException
end
end
else Metadata succeeds
S3API-->>S3StorageService: ObjectMetadata
S3StorageService-->>Caller: return true/false
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
|
Approve |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Web/Resgrid.Web.Tts/Services/S3StorageService.cs (1)
242-251: 💤 Low valueMinor: Constant naming is slightly misleading.
PresignedPutUrlExpiryMinutesis used for HEAD URLs as well. Consider renaming toPresignedUrlExpiryMinutesfor clarity, though this is a minor nitpick.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Web/Resgrid.Web.Tts/Services/S3StorageService.cs` around lines 242 - 251, The constant name PresignedPutUrlExpiryMinutes is misleading when used for HEAD URLs (see CreatePresignedHeadUrl); rename the constant to PresignedUrlExpiryMinutes (or similarly neutral) and update all references (e.g., in CreatePresignedHeadUrl and any presigned PUT methods) to use the new identifier, updating its declaration and any XML/comments to reflect it represents expiry for any presigned URL type to avoid confusion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@Web/Resgrid.Web.Tts/Services/S3StorageService.cs`:
- Around line 242-251: The constant name PresignedPutUrlExpiryMinutes is
misleading when used for HEAD URLs (see CreatePresignedHeadUrl); rename the
constant to PresignedUrlExpiryMinutes (or similarly neutral) and update all
references (e.g., in CreatePresignedHeadUrl and any presigned PUT methods) to
use the new identifier, updating its declaration and any XML/comments to reflect
it represents expiry for any presigned URL type to avoid confusion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 04d3b40f-04c5-45d2-8d5b-c44099a8a0f6
📒 Files selected for processing (6)
Directory.Build.propsTests/Resgrid.Tests/Services/DepartmentSettingsServiceTtsLanguageTests.csTests/Resgrid.Tests/Web/Tts/S3StorageServiceTests.csTests/Resgrid.Tests/Web/Tts/TtsConfigurationRegistrationTests.csTests/Resgrid.Tests/Workers/Console/Tasks/TtsStaticPromptRefreshTaskTests.csWeb/Resgrid.Web.Tts/Services/S3StorageService.cs
Summary by CodeRabbit
Bug Fixes
Tests